#!/usr/bin/env python3

from pylab import *

fp = open('weights_dcds.txt', 'w')


## 130个采样点
## @200kHz
#w_size = 130

#for cnt in range(w_size):
#    for os in range(16):
#        if cnt >= 20 and cnt <= 61:
#            w = 1./42
#        elif cnt >= 77 and cnt <= 118:
#            w = -1./42
#        else:
#            w = 0

#        fp.write('%12.8f '%(w)) 

#    fp.write('\n')
#fp.close()

# 670个采样点
# @162.5kHz
w_size = 160

for cnt in range(w_size):
    for os in range(16):
        if cnt >= 30 and cnt <=79:
            w = 1./50
        elif cnt >= 99 and cnt <= 149:
            w = -1./51
        else:
            w = 0

#        if cnt >= 28 and cnt <=73:
#            w = 1./46
#        elif cnt >= 101 and cnt <= 145:
#            w = -1./45
#        else:
#            w = 0

        fp.write('%12.8f '%(w)) 

    fp.write('\n')
fp.close()




